<?php
/**
 * Company class
 *
 * @category Abovo
 *
 * @package Abovo_Model_Company
 * 
 * @subpackage Abovo_Model_Company_Node
 *
 * @author Antti Holvikari <anttih@gmail.com>
 */

/**
 * Company class
 * 
 * @category Abovo
 * 
 * @package Abovo_Model_Company
 * 
 * @subpackage Abovo_Model_Company_Node
 *
 * @author Antti Holvikari <anttih@gmail.com>
 */
class Abovo_Model_Company_Node extends Solar_Sql_Row  {
    
    /**
     * Fetch all contacts for this company
     *
     * @return Solar_Sql_Rowset
     */
    public function fetchContacts()
    {
        $contacts = Solar::factory('Abovo_Model_Contacts');
        
        return $contacts->fetchAll(array('companies_id = ?' => $this->id));
    }
}
